home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-02-20 | 7.5 KB | 227 lines | [TEXT/MMCC] |
- // *****************************************************************************
- //
- // WindoidDefines.h
- //
- // —————————————————————————————————————————————————————————————————————————————
- // Copyright © 1991-95 Infinity Systems. All rights reserved.
- // —————————————————————————————————————————————————————————————————————————————
- // This file contains only the #define’s used to determine how to compile
- // the Infinity Windoid WDEF. By modifying only this file, you can choose
- // what capabilities will be included when the WDEF is compiled.
- // *****************************************************************************
- #ifndef Infinity_WINDOIDDEFINES
- #define Infinity_WINDOIDDEFINES
-
-
- // —————————————————————————————————————————————————————————————————————————————
- //
- // Conditional Compilation Options
- //
- // —————————————————————————————————————————————————————————————————————————————
- /*
-
- The #define’s you may make include:
-
- COMPLETE STYLES:
-
- qApple75Style - This creates a WDEF that works and looks like the System
- 7.5 floating window WDEF (ID 124). (It just turns on the
- previous two flags.)
-
- qMacAppStyle - This determines if the varcodes that are supported are
- the one's I consider 'normal' or the ones MacApp's
- windoid WDEF knows about. Note, however, that this code
- only supports the “smaller”, title-less version that
- is available in MacApp’s.
-
- qThinkStyle - This creates a version of the WDEF that is totally
- compatible with the varcodes used in the windoid WDEF
- included with the THINK environments.
-
- Two things are done: varcode 0 gives a normal titlebar,
- varcode 2 gives a titlebar down the left side, and other
- varcodes (i.e. 1,3,4,5,6,7) give no titlebar at all.
- Also, for the THINK style, qAlwaysHilite is also set.
-
- OPTION FLAGS:
-
- qApple75Varcodes - This causes the Infinity Windoid to have the same
- behaviors as the System 7.5 floating window WDEF (ID 124)
- when the same varcodes are used.
-
- qAllowVert - This determines if the windoid will support a floater
- that has a vertical title bar along the left side of
- the window.
-
- qAllowGrow - This option creates a WDEF that supports a grow box.
- This grow box behaves exactly like that of a standard
- document window. This addition to the code was provided
- to me by Jim Petrick.
-
- qAllowZoom - This option creates a windoid that supports a zoombox.
-
- The application is responsible for setting the user state
- and standard state Rects of the window for zooming. (When
- a new window is created, both of these are initialized to
- the bounds of the window. See the README for more
- information).
-
- qUseGestalt - Define this if you want to use Gestalt to determine the
- System and QuickDraw versions. Otherwise, SysEnvirons is
- used. (NOTE: using Gestalt in MPW will cause additional
- glue code to be attached to the WDEF resource, making it
- larger.)
-
- SystemSevenOrLater -A standard Apple header flag. If this flag is set,
- a version of the WDEF that doesn't support the System 6
- coloring will be compiled. Note that this version may
- crash on systems earlier than 7.0, so your application
- should make sure to check for System 7 or later.
-
-
- APPEARANCE MODIFICATION:
-
- qApple75Design - This causes the Infinity Windoid to assume the
- appearance of the System 7.5 floating window WDEF
- (ID 124).
-
- qSmallGrow - This option will cause the grow box to be drawn smaller
- than the standard size.
-
- qTitleString - When enabled, the windoid’s title will appear centered
- in the titlebar.
-
- This feature does not look at the script and change the
- size of the titlebar as is recommended for regions with
- an application font that doesn't work at 9 points.
-
-
- BEHAVIOR MODIFICATION:
-
- qStayputZoom - This option will cause both the user and standard Rects
- to be changed together, causing the zoomed in and out
- state to have the same topLeft at all times. If this is
- not set, the standard and user states have their own
- ‘memories’.
-
-
- NO LONGER SUPPORTED:
-
- VERS_2_2_COMPATIBLE - Removed in 3.0.
-
- DONT_ALIGN_ZOOM - Removed in 3.0.
-
- NOT_PBOOK_AWARE - Removed in 3.0. The WDEF will now always check
- for a PowerBook’s passive matrix screen like the
- System does.
-
- MFI_ZOOM - Removed in 3.0. The application can create this
- windoid ‘shrinking’ behavior by setting the zoom
- rectangle information in the window’s dataHandle
- directly (as described in IM: Toolbox Essentials).
-
- THICK_TITLEBAR - Removed in 3.0. I’ve grown to like this so much
- more than the (original) thin version of the
- titlebar that this is now to only way to compile
- it (i.e. it is always on).
-
- ALWAYS_HILITE - Removed in 3.0. This function can be activated
- by using an appropriate variation code (subtracting
- 1 from the constants given in InfinityWindoid.h).
-
- If you depend on any of the above compiler options that are no longer
- supported, you can either use a previous version of the WDEF or make
- the necessary modifications to this version (none of them were overly
- complicated).
-
- Also removed are support for non-universal headers and for System 6
- coloring (with Kolor or a similar control panel) -- although System 6
- black and white support is still included by default. These would
- probably be more difficult to add back in, so if you want them, you
- would be best going back to version 2.6.
-
- ------------------------------------------------------------------------------*/
-
- #define qApple75Style 0
- #define qApple75Varcodes 1
-
- #define qTitleString 1
-
- #define qAllowZoom 1
- #define qAllowGrow 1
- #define qAllowVert 1
-
- #define qStayputZoom 0
-
-
- // —————————————————————————————————————————————————————————————————————————————
- //
- // Combinations
- //
- // —————————————————————————————————————————————————————————————————————————————
- // These should pretty much remain untouched.
- // —————————————————————————————————————————————————————————————————————————————
- #if qApple75Style
- #undef qApple75Design
- #define qApple75Design 1
-
- #undef qApple75Varcodes
- #define qApple75Varcodes 1
-
- #undef qAllowZoom
- #define qAllowZoom 1
-
- #undef qAllowGrow
- #define qAllowGrow 1
-
- #undef qAllowVert
- #define qAllowVert 1
- #endif
-
-
- // —————————————————————————————————————————————————————————————————————————————
- #if qApple75Design
- #undef qTitleString
- #define qTitleString 1
- #endif
-
-
- // —————————————————————————————————————————————————————————————————————————————
- #if qThinkStyle
- #undef qAllowVert
- #define qAllowVert 1
-
- #undef qAlwaysHilite
- #define qAlwaysHilite 1
-
- #undef qMacAppStyle
- #define qMacAppStyle 0
- #endif
-
-
- // —————————————————————————————————————————————————————————————————————————————
- #if qMacAppStyle
- #undef qAllowVert
- #define qAllowVert 0
-
- #undef qAlwaysHilite
- #define qAlwaysHilite 0
-
- #undef qAllowGrow
- #define qAllowGrow 1
- #endif
-
-
- // —————————————————————————————————————————————————————————————————————————————
- //
- // System version define
- //
- // —————————————————————————————————————————————————————————————————————————————
- #define SystemSixOrLater 1
- // This is used so that we can cut down on the code size in MPW. If
- // support for earlier systems is important, get rid of this.
- // Note: for this define to work, MacHeaders cannot be used.
-
-
- // —————————————————————————————————————————————————————————————————————————————
- #endif